package com.wmh.baseservice.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-03-19
 */
@ApiModel(value="SysBanner对象", description="系统轮播图表")
public class SysBanner implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态:	0")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "轮播图描述")
    private String title;

    @ApiModelProperty(value = "所处位置0附近好地 1商城")
    private Integer type;

    @ApiModelProperty(value = "图片路径")
    private String path;

    @ApiModelProperty(value = "跳转url")
    private String url;

    private Integer sort;

    public Long getId() {
        return id;
    }

    public SysBanner setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public SysBanner setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public SysBanner setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public SysBanner setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public SysBanner setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public SysBanner setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public String getTitle() {
        return title;
    }

    public SysBanner setTitle(String title) {
        this.title = title;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public SysBanner setType(Integer type) {
        this.type = type;
        return this;
    }
    public String getPath() {
        return path;
    }

    public SysBanner setPath(String path) {
        this.path = path;
        return this;
    }
    public String getUrl() {
        return url;
    }

    public SysBanner setUrl(String url) {
        this.url = url;
        return this;
    }
    public Integer getSort() {
        return sort;
    }

    public SysBanner setSort(Integer sort) {
        this.sort = sort;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String TITLE = "title";

    public static final String TYPE = "type";

    public static final String PATH = "path";

    public static final String URL = "url";

    public static final String SORT = "sort";

    @Override
    public String toString() {
        return "SysBanner{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", title=" + title +
            ", type=" + type +
            ", path=" + path +
            ", url=" + url +
            ", sort=" + sort +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            SysBanner.ID
            ,SysBanner.STATUS
            ,SysBanner.REMARK
            ,SysBanner.VERSION
            ,SysBanner.CREATE_TIME
            ,SysBanner.UPDATE_TIME
            ,SysBanner.TITLE
            ,SysBanner.TYPE
            ,SysBanner.PATH
            ,SysBanner.URL
            ,SysBanner.SORT
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}